import store from '@/store'
export const tableOption = {
    "border": true,
    "index": true,
    "indexLabel": "序号",
    "stripe": true,
    "menuAlign": "center",
    "align": "center",
    selection:true,
    editBtn: false,
    delBtn: false,
    addBtn: false,
    searchLabelWidth: 100,
    searchMenuSpan: 6,
    height: 450,
    "column": [{
            "type": "input",
            "label": "唯一标识",
            "prop": "id",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "线路编码，不能重复",
            "prop": "lineCode",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "车站编码，不能重复",
            "prop": "stationCode",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "售票员ID",
            "prop": "nsId",
            hide: true,
            display: false,
        },
        {
            "type": "input",
            "label": "在岗时间",
            "prop": "startAndEnd",
            display: false,
            width: 140
        }, {
            "type": "input",
            "label": "售票员工号",
            "prop": "nsJobNo",
            hide: true,
            display: false,
        }, {
            "type": "select",
            "label": "售票员班次",
            "prop": "nsShift",
            dicUrl: '/admin/dict/type/stm_conductor_shift',
            search: true,
            width: 85
        },
        {
            "type": "select",
            "label": "早晚班",
            "prop": "workingStartTime",
            dicUrl: '/admin/dict/type/stm_conductor_moring_night',
            hide: true,
            display: false,
		},
		{
            "type": "select",
            "label": "售票员",
            "prop": "nsName",
            searchLabelWidth: 90,
            search: true,
            //searchSpan: 12,
            params: {
                userCodeKey: 'nsJobNo'
            },
            component: 'user-select',
        },
		{
            "type": "select",
            "label": "设备操作号",
            "prop": "deviceOperateNum",
            dicUrl: '/support/swpmdeviceoperationcode/page',
            props: {
                label: "operationCode",
                value: "operationCode",
                res: "data.records"
            },
            filterable: true,
            dicQuery: {
                size: -1,
                status: "1"
            },
            search: true,
            width: 85
        }, {
            "type": "input",
            "label": "配票人",
            "prop": "matchTicketPersion",
            params: {
                userCodekey: 'matchTicketPersionId',
            },
            component: 'user-select'
        }, {
            "type": "input",
            "label": "配票人工号",
            "prop": "matchTicketPersionId",
            width: 85
        }, {
            "type": "date",
            "label": "在岗开始时间",
            "prop": "workingStartTime",
            hide: true,
            valueFormat: 'yyyy-MM-dd',
            format: 'yyyy-MM-dd'
        }, {
            type: "date",
            label: "在岗开始时间",
            prop: "workingStartTimeDTO",
            format: 'yyyy-MM-dd',
            valueFormat: 'yyyy-MM-dd',
            search: true,
            hide: true,
            showColumn: false,
            display: false
          }, {
            "type": "date",
            "label": "在岗结束时间",
            "prop": "workingEndTime",
            hide: true,
            valueFormat: 'yyyy-MM-dd',
            format: 'yyyy-MM-dd'
        }, {
            type: "date",
            label: "在岗结束时间",
            prop: "workingEndTimeDTO",
            format: 'yyyy-MM-dd',
            valueFormat: 'yyyy-MM-dd',
            search: true,
            hide: true,
            showColumn: false,
            display: false
          }, {
            "type": "number",
            "label": "配备用金金额",
            "prop": "totalSpareAmount",
			precision: 2,
            width: 95
        }, {
            "type": "number",
            "label": "归还备用金金额",
            "prop": "totalHandSpareAmount",
			precision: 2,
            width: 108
        }, {
            "type": "select",
            "label": "设备归属",
            "prop": "deviceAttribution",
            dicData: [{
                    label: '无',
                    value: '0'
                },
                {
                    label: '有',
                    value: '1'
                },
            ],
        },  {
            "type": "select",
            "label": "状态",
            "prop": "submitStatus",
            "dicUrl": '/admin/dict/type/submit_status',
            "display": false,
            search: true,
            searchValue:'0'
        }, {
            "type": "select",
            "label": "确认状态",
            "prop": "confirmStatus",
            dicData: [{
                    label: '未确认',
                    value: '0'
                },
                {
                    label: '已确认',
                    value: '1'
                },
            ],
            search: true
            //hide: true,
        }, 	{
            width: 120,
            hide: false,
            label: '是否加入报表差错',
            prop: 'isAddReprotError',
            type:'select',
            dicData: [{
              label: '是',
              value: '1'
            },{
              label: '否',
              value: '0'
            }],
          }, {
            hide: false,
            label: '报表修改状态',
            prop: 'reportModifyStatus',
            type:'select',
            search: true,
            dicData: [{
			 label: '修改中',
			  value: '1'
			 },{
			   label: '已完成',
			  value: '0'
			 }],
            width: 95
          },{
            "type": "input",
            "label": "备注",
            "prop": "remark",
            hide: true,
        }, {
            "type": "input",
            "label": "创建人ID",
            "prop": "creatorId",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "创建人名称",
            "prop": "creatorName",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "创建时间",
            "prop": "createTime",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "更新时间",
            "prop": "updateTime",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "部门ID",
            "prop": "deptId",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "删除标志 1：删除 0：未删",
            "prop": "delFlag",
            hide: true,
            display: false,
        }
    ]
}

export const tableOptionAdd = {
    submitBtn: false,
    emptyBtn: false,
    labelWidth: 100,
    "column": [{
            "type": "select",
            "label": "售票员",
            "prop": "nsName",
            span: 8,
            params: {
                userCodeKey: 'nsJobNo',
                operateNo:'deviceOperateNum'
            },
            component: 'user-select',
            search: true,
            rules: [{
              required: true,
              message: '请选择售票员'
            }]
        }, {
            "type": "input",
            "label": "售票员工号",
            "prop": "nsJobNo",
            hide: true,
            span: 8,
            display: false,
        }, {
            "type": "select",
            "label": "设备操作号",
            "prop": "deviceOperateNum",
            span: 8,
            dicUrl: '/support/swpmdeviceoperationcode/page',
            props: {
                label: "operationCode",
                value: "operationCode",
                res: "data.records"
            },
            filterable: true,
            allowCreate: true,
            dicQuery: {
                size: -1,
                stationCode: store.getters.userInfo.stationCode,
                status: '1'
            },
            rules: [{
              required: true,
              message: '请选择设备操作编号'
            }]
        }, {
            "type": "select",
            "label": "售票员班次",
            "prop": "nsShift",
            span: 8,
            filterable: true,
            dicUrl: '/admin/dict/type/stm_conductor_shift',
			rules: [{
              required: true,
              message: '请选择售票员班次'
            }]
        },
        {
            "type": "select",
            "label": "早晚班",
            "prop": "nsMoringNightShift",
            span: 8,
            dicUrl: '/admin/dict/type/stm_conductor_moring_night',
            hide: true,
            display: false
        },
        {
            "type": "datetime",
            "label": "开始时间",
            "prop": "workingStartTime",
            valueFormat: 'yyyy-MM-dd HH:mm:ss',
            format: 'yyyy-MM-dd HH:mm:ss',
            span: 8,
            rules: [{
                required: true,
                message: '请选择开始时间'
            }]
        },
        {
            "type": "number",
            "label": "配备用金金额",
             "prop": "spareAmount",
             precision: 2,
             span: 8,
             step: 0,
            labelWidth:150,
            rules: [{
              required: true,
              message: '请填写配备用金金额'
            }]
         },
    ]
}

export const tableOptionMergeEdit = {
    submitBtn: false,
    emptyBtn: false,
    labelWidth: 100,
    "column": [{
            "type": "select",
            "label": "售票员",
            "prop": "nsName",
            span: 8,
            disabled: true,
            rules: [{
              required: true,
              message: '请选择售票员'
            }]
        }, {
            "type": "input",
            "label": "售票员工号",
            "prop": "nsJobNo",
            span: 8,
            display: false
        }, {
            "type": "select",
            "label": "设备操作号",
            "prop": "deviceOperateNum",
            span: 8,
            disabled: true,
            rules: [{
              required: true,
              message: '请选择设备操作编号'
            }]
        }, {
            "type": "select",
            "label": "售票员班次",
            "prop": "nsShift",
            span: 8,
            filterable: true,
            dicUrl: '/admin/dict/type/stm_conductor_shift',
            rules: [{
              required: true,
              message: '请选择售票员班次'
            }],
            disabled: true
        },{
            "type": "select",
            "label": "早晚班",
            "prop": "nsMoringNightShift",
            span: 8,
            dicUrl: '/admin/dict/type/stm_conductor_moring_night',
            hide: true,
            display: false
        },{
            "type": "datetime",
            "label": "开始时间",
            "prop": "workingStartTime",
            valueFormat: 'yyyy-MM-dd HH:mm:ss',
            format: 'yyyy-MM-dd HH:mm:ss',
            span: 8,
            rules: [{
                required: true,
                message: '请选择开始时间'
            }]
        },{
            "type": "number",
            "label": "配备用金金额",
             "prop": "spareAmount",
             precision: 2,
             span: 8,
             step: 0
         }
    ]
}


export const tableOptionReturn = {
    submitBtn: false,
    emptyBtn: false,
    labelWidth: 100,
    "column": [{
            "type": "select",
            "label": "售票员",
            "prop": "nsName",
            dicUrl: "/admin/user/page",
            props: {
                label: "nikename",
                value: "userCode",
                res: "data.records"
            },
            dicQuery: {
                size: -1
            },
            search: true,
            disabled: true,
        }, {
            "type": "input",
            "label": "售票员工号",
            "prop": "nsJobNo",
            hide: true,
            display: false,
        }, {
            "type": "select",
            "label": "设备操作号",
            "prop": "deviceOperateNum",
            dicUrl: '/support/swpmdeviceoperationcode/page',
            labelWidth: 130,
            props: {
                label: "operationCode",
                value: "operationCode",
                res: "data.records"
            },
            filterable: true,
            allowCreate: true,
            dicQuery: {
                size: -1
            },
            disabled: true,
            rules: [{
              required: true,
              message: '请选择设备操作编号'
            }]
        },

        {
            "type": "datetime",
            "label": "归还时间",
            "prop": "workingEndTime",
            valueFormat: 'yyyy-MM-dd HH:mm:ss',
            format: 'yyyy-MM-dd HH:mm:ss',
            rules: [{
                required: true,
                message: '请选择归还时间'
            }]
        },
        {
            "type": "number",
            "label": "归还配备用金金额",
            "prop": "totalHandSpareAmount",
            precision: 2,
            labelWidth: 150,
            rules: [{
                required: true,
                message: '请输入归还配备用金金额'
            }]
        },
    ]
}


export const tableOptionView = {
    submitBtn: false,
    emptyBtn: false,
    detail: true,
    "column": [{
            "type": "select",
            "label": "售票员",
            "prop": "nsName",
            // params: {
            //     userCodeKey: 'nsJobNo'
            // },
            // component: 'user-select',
            // search: true,
        }, {
            "type": "input",
            "label": "售票员工号",
            "prop": "nsJobNo",
            hide: true,
            display: false,
        }, {
            "type": "select",
            "label": "设备操作号",
            "prop": "deviceOperateNum",
            dicUrl: '/support/swpmdeviceoperationcode/page',
            props: {
                label: "operationCode",
                value: "operationCode",
                res: "data.records"
            },
            dicQuery: {
                size: -1
            },
            filterable: true,
            allowCreate: true,
            rules: [{
              required: true,
              message: '请选择设备操作编号'
            }]
        }, {
            "type": "select",
            "label": "售票员班次",
            "prop": "nsShift",
            dicUrl: '/admin/dict/type/stm_conductor_shift',
            display: false,
        },
        {
            "type": "select",
            "label": "早晚班",
            "prop": "nsMoringNightShift",
            dicUrl: '/admin/dict/type/stm_conductor_moring_night',
            hide: true,
            display: false
        },
        {
            "type": "datetime",
            "label": "开始时间",
            "prop": "workingStartTime",
            valueFormat: 'yyyy-MM-dd HH:mm:ss',
            format: 'yyyy-MM-dd HH:mm:ss',
        }, {
            "type": "datetime",
            "label": "结束时间",
            "prop": "workingEndTime",
            hide: true,
            valueFormat: 'yyyy-MM-dd HH:mm:ss',
            format: 'yyyy-MM-dd HH:mm:ss',
        },
        {
            "type": "number",
            "label": "配备用金金额",
            "prop": "totalSpareAmount",
            precision: 2,
            hide: true,
            labelWidth: 170,
        }, {
            "type": "number",
            "label": "归还备用金金额",
            "prop": "totalHandSpareAmount",
            precision: 2,
            hide: true,
            labelWidth: 170,
        },
    ]
}


export const tableOptionRecords = {
    "border": true,
    "index": true,
    "indexLabel": "序号",
    "stripe": true,
    "menuAlign": "center",
    "align": "center",
    submitBtn: false,
    emptyBtn: false,
    editBtn: false,
    delBtn: false,
    addBtn: false,
    refreshBtn: false,
    "column": [{
            "type": "select",
            "label": "售票员",
            "prop": "nsName"
        }, {
            "type": "input",
            "label": "售票员工号",
            "prop": "nsJobNo"
        }, {
            "type": "select",
            "label": "设备操作号",
            "prop": "deviceOperateNum",
            dicUrl: '/support/swpmdeviceoperationcode/page',
            props: {
                label: "operationCode",
                value: "operationCode",
                res: "data.records"
            },
            dicQuery: {
                size: -1
            },
            allowCreate: true
        }, {
            "type": "select",
            "label": "售票员班次",
            "prop": "nsShift",
            dicUrl: '/admin/dict/type/stm_conductor_shift'
        },
        {
            "type": "datetime",
            "label": "开始时间",
            "prop": "workingStartTime",
            valueFormat: 'yyyy-MM-dd HH:mm:ss',
            format: 'yyyy-MM-dd HH:mm:ss',
        }, {
            "type": "datetime",
            "label": "结束时间",
            "prop": "workingEndTime",
            valueFormat: 'yyyy-MM-dd HH:mm:ss',
            format: 'yyyy-MM-dd HH:mm:ss',
        },{
            "type": "select",
            "label": "操作内容",
            "prop": "saveLogFlag",
            dicData:[{
                label: '编辑操作',
                value: '1'
              }, {
                label: '归还操作',
                value: '2'
              }
            ]
        },{
            "type": "datetime",
            "label": "修改日期",
            "prop": "entryUpdateTime",
            valueFormat: 'yyyy-MM-dd HH:mm:ss',
            format: 'yyyy-MM-dd HH:mm:ss',
        },{
            "type": "number",
            "label": "配备用金金额",
            "prop": "totalSpareAmount",
            precision: 2
        },  {
            "type": "number",
            "label": "归还备用金金额",
            "prop": "totalHandSpareAmount",
            precision: 2
        }
    ]
}


export const tableOptionNewAdd = {
    "border": true,
    "index": true,
    "indexLabel": "序号",
    "stripe": true,
    "menuAlign": "center",
    "align": "center",
    detail: true,
    "column": [{
            "type": "input",
            "label": "唯一标识",
            "prop": "id",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "线路编码，不能重复",
            "prop": "lineCode",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "车站编码，不能重复",
            "prop": "stationCode",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "售票员ID",
            "prop": "nsId",
            hide: true,
            display: false,
        },
        {
            "type": "input",
            "label": "在岗时间",
            "prop": "startAndEnd",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "售票员工号",
            "prop": "nsJobNo",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "售票员",
            "prop": "nsName"
        }, {
            "type": "datetime",
            "label": "在岗开始时间",
            "prop": "workingStartTime",
            hide: true,
            display: false,
            valueFormat: 'yyyy-MM-dd HH:mm:ss',
            format: 'yyyy-MM-dd HH:mm:ss',
        }, {
            "type": "input",
            "label": "在岗结束时间",
            "prop": "workingEndTime",
            hide: true,
            display: false,
            valueFormat: 'yyyy-MM-dd HH:mm:ss',
            format: 'yyyy-MM-dd HH:mm:ss',
        }, {
            "type": "input",
            "label": "售票员班次",
            "prop": "nsShift",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "设备操作号",
            "prop": "deviceOperateNum",

        }, {
            "type": "input",
            "label": "配票人",
            "prop": "matchTicketPersion",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "配票人工号",
            "prop": "matchTicketPersionId",
            hide: true,
            display: false,
        }, {
            "type": "number",
            "label": "配备用金金额",
            "prop": "totalSpareAmount",
			precision: 2,
            hide: true,
            display: false,
        }, {
            "type": "number",
            "label": "归还备用金金额",
            "prop": "totalHandSpareAmount",
			precision: 2,
            hide: true,
            display: false,
        }, {
            "type": "select",
            "label": "设备归属",
            "prop": "deviceAttribution",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "0未确认 1已确认",
            "prop": "confirmStatus",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "备注",
            "prop": "remark",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "创建人ID",
            "prop": "creatorId",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "创建人名称",
            "prop": "creatorName",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "创建时间",
            "prop": "createTime",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "更新时间",
            "prop": "updateTime",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "部门ID",
            "prop": "deptId",
            hide: true,
            display: false,
        }, {
            "type": "input",
            "label": "删除标志 1：删除 0：未删",
            "prop": "delFlag",
            hide: true,
            display: false,
        }
    ]
}
